package br.com.AC.entidades;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the convenio_has_medico database table.
 * 
 */
@Embeddable
public class ConvenioHasMedicoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="Convenio_idconvenio")
	private int convenio_idconvenio;

	@Column(name="Medico_crm")
	private int medico_crm;

    public ConvenioHasMedicoPK() {
    }
	public int getConvenio_idconvenio() {
		return this.convenio_idconvenio;
	}
	public void setConvenio_idconvenio(int convenio_idconvenio) {
		this.convenio_idconvenio = convenio_idconvenio;
	}
	public int getMedico_crm() {
		return this.medico_crm;
	}
	public void setMedico_crm(int medico_crm) {
		this.medico_crm = medico_crm;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof ConvenioHasMedicoPK)) {
			return false;
		}
		ConvenioHasMedicoPK castOther = (ConvenioHasMedicoPK)other;
		return 
			(this.convenio_idconvenio == castOther.convenio_idconvenio)
			&& (this.medico_crm == castOther.medico_crm);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.convenio_idconvenio;
		hash = hash * prime + this.medico_crm;
		
		return hash;
    }
}